Learn how to use an arduino for input output. Start with some examples:
- Do the official arduino blink tutorial using both the built-in LED and an external LED.
- Do the official arduino AnalogReadSerial tutorial. Look at the voltage using the Serial Monitor and Serial Plotter under "Tools." Vary the voltage using the pot. What is the digitization error?
- Modify the code to average the voltage 100 times. What do you observe on the Serial Plotter as a function of the number of times you average?
- Do the official arduino button tutorial using a push button.
- Download and install the button library from git hub. Instructions on how to install arduino libraries. Use the SimpleOneButtonSingleClick sketch to toggle an LED on and off.
- Hook up a DC motor to the H-bridge. Connect the PWM input to the H-bridge to a PWM output on the arduino. Run the motor at different PWM settings. Reverse direction using your push button. Maybe disable the motor before reversing directions.